USE [MusicCatalog]
GO
/****** Object:  Table [dbo].[Users]    Script Date: 10/15/2009 09:08:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Users](
	[UserID] [int] IDENTITY(1,1) NOT NULL,
	[UserName] [varchar](50) COLLATE Cyrillic_General_CI_AS NULL,
	[Password] [varchar](30) COLLATE Cyrillic_General_CI_AS NULL,
 CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED 
(
	[UserID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

INSERT INTO Users
	(UserName, Password)
	VALUES
	('admin', '123')
GO

CREATE PROCEDURE [dbo].[GetUser]
	(
	@UserName varchar(50),
	@Password varchar(30)
	)
AS
SET NOCOUNT ON
	SELECT UserName FROM Users
		WHERE UserName = @UserName AND Password = @Password
GO